package com.summer.service.activemq;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.stereotype.Service;

import javax.jms.Destination;

/**
 * Created by thinkpad on 2018/6/24.
 */
@Service
public class Producer {

    @Autowired
    private JmsMessagingTemplate jmsTemplate;

    public void sendMessage(Destination destination,final String message){
        jmsTemplate.convertAndSend(destination,message);
    }

}
